clear all;
v_size = 320;
h_size = 240;
rgb = imread('gui_240x320.bmp');

fp = fopen('rgb_240x320.txt','w');

for V = 1:v_size
    for H = 1:h_size
        fprintf(fp,'%02x\n',rgb(V,H,1));%R
        fprintf(fp,'%02x\n',rgb(V,H,2));%G
        fprintf(fp,'%02x\n',rgb(V,H,3));%B
    end
end

fclose(fp);
